import request from '@/utils/request';

// 查询用户列表
export function listUser(query) {
  return request({
    url: '/community/article/userList',
    method: 'get',
    params: query
  });
}

// 搜索热门话题
export function searchTrendingTopic(query) {
  return request({
    url: '/community/article/trendingTopic',
    method: 'get',
    params: query
  });
}

// 选择用户列表
export function selectUserList(query) {
  return request({
    url: '/community/article/selectUserList',
    method: 'get',
    params: query
  });
}

// 编辑用户标签
export function editUserTag(data) {
  return request({
    url: '/system/user/profile/editUserTag',
    method: 'post',
    data: data
  });
}

// 获取用户官方身份标签列表
export function getUserOfficialTags(query) {
  return request({
    url: '/community/user/userOfficialTags',
    method: 'get',
    params: query
  });
}

// 根据用户ID获取用户信息
export function getUserInfo(params) {
  return request({
    url: '/community/article/userList',
    method: 'get',
    params: params
  });
}

// 添加官方铭牌
export function addOfficialTags(name) {
  return request({
    url: '/community/user/addOfficialTags',
    method: 'get',
    params: { name }
  });
}